﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using WPControla.Client.IoC;
using WPControla.Client.ViewModels;

namespace WPControla.Client.Services
{
    /// <summary>
    /// Class to wrap IoC Container and provide a single resolve point.
    /// </summary>
    public class ViewModelLocatorService
    {
        private IContainer container;

        /// <summary>
        /// Constructor
        /// </summary>
        public ViewModelLocatorService()
        {
            container = new Container();
        }

        /// <summary>
        /// Mainpage viewmodel resolver and binding.
        /// </summary>
        public IVMMainPage MainViewModel
        {
            get
            {
                return container.Resolve<IVMMainPage>();
            }
        }

        /// <summary>
        /// ViewArticle viewmodel resolver and binding.
        /// </summary>
        public IVMViewArticle ArticleViewModel
        {
            get
            {
                return container.Resolve<IVMViewArticle>();
            }
        }

        /// <summary>
        /// ViewChapter viewmodel resolver and binding.
        /// </summary>
        public IVMViewChapter ChapterViewModel
        {
            get
            {
                return container.Resolve<IVMViewChapter>();
            }
        }

        /// <summary>
        /// ViewTweet viewmodel resolver and binding.
        /// </summary>
        public IVMViewTweet TweetViewModel
        {
            get
            {
                return container.Resolve<IVMViewTweet>();
            }
        }
    }
}
